﻿using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Ndex.Core.Service
{
    [DataContract]
    public class DataListRequest : ServiceRequest
    {
        [DataMember]
        public List<long> IDs { get; set; }
        public override List<ValidationModel> Validate()
        {
            var result = base.Validate();
            IDs = IDs ?? new List<long>();
            IDs = IDs.Distinct().ToList();
            return result;
        }
    }
}